import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:fluwx/fluwx.dart';

class Login extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    // TODO: implement createState
    return new _login();
  }
}

class _login extends State<Login> {


  ShapeBorder LoginButtomShape = const RoundedRectangleBorder(
      side: BorderSide.none,
      borderRadius: BorderRadius.all(Radius.circular(10)));


  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return new Scaffold(
      body: new Stack(
        children: <Widget>[
          Positioned(
              child: new Align(
                child: new Column(
                  children: <Widget>[
                    new Container(
                      child: new MaterialButton(
                        onPressed: () {
                         sendWeChatAuth(scope: "snsapi_userinfo",state:"wechat_sdk_demo_test");

                        },
                        child: new Row(
                          crossAxisAlignment: CrossAxisAlignment.center,
                          mainAxisAlignment: MainAxisAlignment.center,
                          children: <Widget>[new Text("微信登陆")],
                        ),
                        color: Colors.yellow,
                        shape:LoginButtomShape,
                      ),
                      width: 300.0,
                    )
                  ],
                ),
              ),
            bottom: 20.0,
            left: 0,
            right: 0,
          ),
        ],
      ),
    );
  }
}
